<?php

namespace Modules\Common\Models\Validation;


/**
*@property int $id
*@property int $sid
*@property int $eid
*@property string $username
*@property string $nickname
*@property string $wx_openid
*@property string $thumb
*@property int $gender
*@property string $idcard
*@property string $email
*@property string $mobile
*@property string $password
*@property string $age
*@property int $level
*@property string $personal_profile
*@property string $address
*@property string $city
*@property string $province
*@property string $postal_code
*@property string $rofileImage
*@property string $token
*@property string $token_expired_at
*@property string $token_string
*@property int $status
*@property string $created_at
*@property string $updated_at
*@property string $deteled_at
*@property string $last_login_time
*@property string $login_num
*@property string $last_login_ip
 */


 
trait UsersValidation 
{


    public function createRules()
    {
         return [
            'rules' => [
                'username'=>'between:0,32',
                'nickname'=>'between:0,32',
                'wx_openid'=>'between:0,32',
                'thumb'=>'between:0,64',
                'gender'=>'between:0,32',
                'idcard'=>'between:0,32',
                'email'=>'integer',
                'mobile'=>'between:0,64',
                'password'=>'between:0,32',
                'age'=>'between:0,32',
                'birth_date'=>'integer',
                'level'=>'between:0,64',
                'personal_profile'=>'between:0,32',
                'address'=>'between:0,32',
                'city'=>'integer',
                'province'=>'between:0,64',
                'postal_code'=>'between:0,32',
                'country'=>'between:0,32',
                'rofileImage'=>'integer',
                'token'=>'between:0,64',
                'token_expired_at'=>'between:0,32',
                'token_string'=>'between:0,32',
                'status'=>'integer',
                'last_login_time'=>'between:0,64',
                'login_num'=>'between:0,32',
                'last_login_ip'=>'between:0,32',
                
            ],
            'messages' => [
            ],
            'customAttributes' => [
            ]
        ];
    }

    public function updateRules()
    {
         return [
            'rules' => [
                'username'=>'between:0,32',
                'nickname'=>'between:0,32',
                'wx_openid'=>'between:0,32',
                'thumb'=>'between:0,64',
                'gender'=>'between:0,32',
                'idcard'=>'between:0,32',
                'email'=>'integer',
                'mobile'=>'between:0,64',
                'password'=>'between:0,32',
                'age'=>'between:0,32',
                'birth_date'=>'integer',
                'level'=>'between:0,64',
                'personal_profile'=>'between:0,32',
                'address'=>'between:0,32',
                'city'=>'integer',
                'province'=>'between:0,64',
                'postal_code'=>'between:0,32',
                'country'=>'between:0,32',
                'rofileImage'=>'integer',
                'token'=>'between:0,64',
                'token_expired_at'=>'between:0,32',
                'token_string'=>'between:0,32',
                'status'=>'integer',
                'last_login_time'=>'between:0,64',
                'login_num'=>'between:0,32',
                'last_login_ip'=>'between:0,32',
            ],
            'messages' => [
            ],
            'customAttributes' => [
            ]
        ];
    }


}
